home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJLSR200.ZIP / src / libc / compat / sys / resource / resource.txh < prev   
Encoding:
C/C++ Source or Header  |  1995-07-23  |  721 b   |  38 lines

  1. @node getrusage, unix
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <sys/time.h>
  6. #include <sys/resource.h
  7.  
  8. int getrusage(int who, struct rusage *rusage);
  9. @end example
  10.  
  11. @subheading Description
  12.  
  13. This function returns information about the running process.  Currently,
  14. the only field that is computed is this:
  15.  
  16. @example
  17. struct rusage @{
  18.   struct timeval ru_utime;  /* total time used by process */
  19. @};
  20. @end example
  21.  
  22. The remainder of the fields are set to zero.
  23.  
  24. The @var{who} parameter must be @code{RUSAGE_SELF} or
  25. @code{RUSAGE_CHILDREN}. 
  26.  
  27. @subheading Return Value
  28.  
  29. Zero on success, nonzero on failure.
  30.  
  31. @subheading Example
  32.  
  33. @example
  34. struct rusage r;
  35. getrusage(RUSAGE_SELF, &r);
  36. @end example
  37.  
  38.